package org.micro.frame.um.service.impl;

import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.micro.frame.um.entity.Member;
import org.micro.frame.um.mapper.MemberMapper;
import org.micro.frame.um.service.IMemberService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * Member 表数据服务层接口实现类
 *
 * @author lry
 */
@Service
public class MemberServiceImpl extends ServiceImpl<MemberMapper, Member> implements IMemberService {

    @Resource
    private MemberMapper memberMapper;

    @Transactional(propagation = Propagation.REQUIRED, isolation = Isolation.DEFAULT, timeout = 36000, rollbackFor = Exception.class)
    @Override
    public Integer addMember(Member member) {
        return memberMapper.insert(member);
    }

}